package com.ccsoft.leetcode.service;

import org.springframework.stereotype.Service;

/**
 * 58. 最后一个单词的长度
 */
@Service
public class LengthOfLastWord {
    public int lengthOfLastWord(String s) {
        String[] strArray = s.split(" ");
        return strArray[strArray.length-1].length();
    }
}
